package com.huimingpay.merchant.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName staff
 */
@TableName(value ="staff")
public class Staff implements Serializable {
    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 商户ID
     */
    private Long merchantId;

    /**
     * 姓名
     */
    private String fullName;

    /**
     * 职位
     */
    private String position;

    /**
     * 用户名(关联统一用户)
     */
    private String username;

    /**
     * 手机号(关联统一用户)
     */
    private String mobile;

    /**
     * 员工所属门店
     */
    private Long storeId;

    /**
     * 最后一次登录时间
     */
    private Date lastLoginTime;

    /**
     * 0表示禁用，1表示启用
     */
    private Boolean staffStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 商户ID
     */
    public Long getMerchantId() {
        return merchantId;
    }

    /**
     * 商户ID
     */
    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    /**
     * 姓名
     */
    public String getFullName() {
        return fullName;
    }

    /**
     * 姓名
     */
    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    /**
     * 职位
     */
    public String getPosition() {
        return position;
    }

    /**
     * 职位
     */
    public void setPosition(String position) {
        this.position = position;
    }

    /**
     * 用户名(关联统一用户)
     */
    public String getUsername() {
        return username;
    }

    /**
     * 用户名(关联统一用户)
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 手机号(关联统一用户)
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * 手机号(关联统一用户)
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * 员工所属门店
     */
    public Long getStoreId() {
        return storeId;
    }

    /**
     * 员工所属门店
     */
    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    /**
     * 最后一次登录时间
     */
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    /**
     * 最后一次登录时间
     */
    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    /**
     * 0表示禁用，1表示启用
     */
    public Boolean getStaffStatus() {
        return staffStatus;
    }

    /**
     * 0表示禁用，1表示启用
     */
    public void setStaffStatus(Boolean staffStatus) {
        this.staffStatus = staffStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Staff other = (Staff) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
            && (this.getFullName() == null ? other.getFullName() == null : this.getFullName().equals(other.getFullName()))
            && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime()))
            && (this.getStaffStatus() == null ? other.getStaffStatus() == null : this.getStaffStatus().equals(other.getStaffStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
        result = prime * result + ((getFullName() == null) ? 0 : getFullName().hashCode());
        result = prime * result + ((getPosition() == null) ? 0 : getPosition().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
        result = prime * result + ((getStaffStatus() == null) ? 0 : getStaffStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", merchantId=").append(merchantId);
        sb.append(", fullName=").append(fullName);
        sb.append(", position=").append(position);
        sb.append(", username=").append(username);
        sb.append(", mobile=").append(mobile);
        sb.append(", storeId=").append(storeId);
        sb.append(", lastLoginTime=").append(lastLoginTime);
        sb.append(", staffStatus=").append(staffStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}